package org.dromara.event.domain.vo;

import org.dromara.event.domain.ChatGroup;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 群组信息（使用JSON存储成员ID简化设计）视图对象 chat_group
 *
 * @author 吴俊杰
 * @date 2025-04-24
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = ChatGroup.class)
public class ChatGroupVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 群组ID（与用户表ID类型保持一致）
     */
    @ExcelProperty(value = "群组ID", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "与=用户表ID类型保持一致")
    private Long groupId;

    /**
     * 群名称（最大长度100字符）
     */
    @ExcelProperty(value = "群名称", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "最=大长度100字符")
    private String groupName;

    /**
     * 创建者ID（外键关联sys_user.user_id）
     */
    @ExcelProperty(value = "创建者ID", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "外=键关联sys_user.user_id")
    private Long createUserId;

    /**
     * 群头像存储路径（OSS相对路径）
     */
    @ExcelProperty(value = "群头像存储路径", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "O=SS相对路径")
    private String avatar;

    /**
     * 群成员ID列表（JSON数组格式，如[1001,1002]）
     */
    @ExcelProperty(value = "群成员ID列表", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "J=SON数组格式，如[1001,1002]")
    private String memberIds;

    private Date createTime;




}
